'''
冰雹猜想
2021-9-25 Nasa
'''


def bingbao(n):
    '''

    :param n: 输入一个正整数
    :return: l: 列表, 所有计算的过程都存入列表
    '''
    if n == 1:
        return [1]
    l = []
    while n != 1:
        if n % 2 == 1:
            n = n * 3 + 1
            l.append(n)
        else:
            n /= 2
            l.append(n)
    return l


if __name__ == '__main__':
    # for i in range(1, 6):
    #     if bingbao(i)[-1] != 1:
    #         print(f'冰雹({i})不是1')
    #         break
    #     print(i, len(bingbao(i)))
    print(len(bingbao(5000)))
